//-
//- Copyright (c) Microsoft. All rights reserved.
//- Licensed under the MIT license. See LICENSE file in the project root for full license information.
//-

extends ../layout

block content
  div.container

    if twoFactorOff === true

      if notValidated && user.github
        h1 2FA is still not enabled for #{user.github.displayName || user.github.username}...
      else
        h1 2FA is not enabled

      p.lead This GitHub organization requires multi-factor authentication. Let's set it up now.

      p If you already have an Authenticator app, this step takes <strong>2 minutes</strong>. If you need to install and configure an app for the first time, this will likely take <strong>5-10 minutes</strong>. This multi-factor setup is separate from your corporate authentication.

      div.alert.alert-gray(role='alert')
        if notValidated
          strong Your GitHub account is still not protected with MFA
        else
          strong Two-factor auth is not turned on for your GitHub account
        p.
          Please enable 2FA on GitHub.com.

        if notValidated
          p As of #{nowString} UTC, the GitHub API reports that your account is not as secure as it can be. By using a multi-factor app on your mobile device or signing up for SMS authentication messages, your account can be much more secure.

        ul.list-inline
          li
            a.btn.btn-primary(href='https://github.com/settings/two_factor_authentication/configure', target='_new') Configure 2FA <i class="glyphicon glyphicon-share-alt"></i>
          li
            a.btn.btn-success(href=organization.baseUrl + 'security-check?validate=validate' + (onboarding ? '&onboarding=' + onboarding : '')) Validate 2FA and Continue
          li
            a.btn.btn-default(href='/unlink') Cancel my corporate participation

      include twoFactorInstructions

    else

      h1 Two-factor security is enabled

      p.
        Thanks for helping to keep the organization secure.

      p
        a.btn.btn-primary(href=organization.baseUrl) Go to the #{organization.name} portal
